test(s3): cover select not-implemented fallbacks#154
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR closes a remaining regression gap around the recent S3 Select error-classification work.
When an S3-compatible backend does not return stable error metadata, the client falls back to matching error text. The current code already treats
NotImplementedasUnsupportedFeature, but the recent tests only covered the direct code-path and a few metadata-missing cases. Two fallback branches were still untested: one where AWS returns an unrelated service code but the response text still includesNotImplemented, and one where metadata is missing entirely and only the text can be inspected.This patch adds focused unit coverage for those two fallback paths in
crates/s3/src/select.rs. It does not change runtime behavior.Root Cause
The earlier S3 Select test additions covered the new
AccessDeniedfallback and the serialization helpers, but they did not exercise theNotImplementedsubstring fallbacks that protect compatibility with backends that surface incomplete or inconsistent error metadata.Validation
cargo test -p rc-s3 select::tests --libcargo fmt --all --checkmake pre-commit